package Meetings;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class TestSystem {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        // 初始化会议室
        List<MeetingRoom> meetingRooms = new ArrayList<>();
        meetingRooms.add(new MeetingRoom("会议室A-101", 20, true));
        meetingRooms.add(new MeetingRoom("会议室A-201", 15, true));
        meetingRooms.add(new MeetingRoom("会议室B-301", 40, true));
        meetingRooms.add(new MeetingRoom("会议室C-401", 20, false));
        meetingRooms.add(new MeetingRoom("会议室D-501", 30, false));
        ReservationSystem rSystem = new ReservationSystem(meetingRooms);
        System.out.println("---欢迎进入会议室预定系统---");
        System.out.println("1. 查看所有会议室");
        System.out.println("2. 预定会议室");
        System.out.println("3. 查看预定信息");
        System.out.println("4. 查看指定时间可用的会议室");
        System.out.println("5. 退出系统");
        while (true) {
            System.out.print("请输入数字，选择功能：");
            int option = sc.nextInt();
            switch (option) {
                case 1:
                    rSystem.showAllMeetingRooms();
                    break;
                case 2:
                    rSystem.reserveMeetingRoom();
                    break;
                case 3:
                    rSystem.showResInfo();
                    break;
                case 4:
                    rSystem.selectRoomByTime();
                    break;
                case 5:
                    System.exit(0);
            }
        }
    }
}
